package com.xrc.T4;

public class Penguin {
    private String name;
    private Integer health = 100;
    private Integer love = 0;
    private String gender;

    public Penguin() {
    }

    public Penguin(String name, Integer health, Integer love, String gender) {
        this.name = name;
        this.health = health;
        this.love = love;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getHealth() {
        return health;
    }

    public void setHealth(Integer health) {
        this.health = health;
    }

    public Integer getLove() {
        return love;
    }

    public void setLove(Integer love) {
        this.love = love;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        String str="宠物的自白"+"\n我名字"+name+"\n健康值"+health+"亲密度"+love+"性别"+gender;
        return str;
    }
}